home *** CD-ROM | disk | FTP | other *** search
- SMENU412.MOD Hotkey pop-up sysop/cosysop menu
- Stingray #52 @5060
- Sat Nov 30 11:29:00 1991
- Name: SMENU412.MOD
- Author: Stingray
- Difficulty: Easy
- Version: WWIV 4.11, 4.12 version. WWIV v4.20 version also available.
- Files: VARS.H, FCNS.H, COM.C, SYSOPF.C
- Description: This mod provides a hot-keyed menu for the use of sysops and
- co-sysops. It is available from anywhere in the BBS and will
- perform all of the needed functions (plus, it's easy to add
- more if you want to, or to change this mod to do something
- else!). It will present the sysop or co-sysop with a prompt
- when they press ^E, and they can select most cosysop or sysop
- commands with single letters.
-
-
- Step 1:
- Backup all of your source files!
- I may have implanted a bug in this mod that will erase *.c, just to check
- if you did this.
- <grin>
-
- Step 2:
- Load VARS.H
- At the end of the file, add this line:
- int insysmenu;
- Save VARS.H
-
- Step 3:
- Load FCNS.H
- At the end of the declarations for SYSOPF.C, add this line:
- void sysmenu();
- Save FCNS.H
-
- Step 4:
- Load COM.C
- Search for:
- if (helpl && !ihelp && !chatting && echo) {
- Two lines above that, right before it says "case 15:", put in this code:
- case 5:
- if ((cs())&&(okmacro)) {
- sysmenu();
- }
- break;
- Save COM.C
-
- Step 5:
- Load SYSOPF.C
- At the end of the file, block read this in:
- /* Start here */
-
- void sysmenu()
- {
- char chr,xl[81],cl[81],atr[81],cc,s1[81];
-
- if(insysmenu==0) {
- savel(cl,atr,xl,&cc);
- insysmenu=1;
- outchr('\x0c');
- while((insysmenu)&&(!hangup)) {
- outstr("0/1Sysop Menu0/2-0");
- if(so()) {
- chr=onek("?SILTYUZVBEDGCHMOQ");
- } else {
- chr=onek("?SILTYUZVQ");
- }
- switch(chr) {
- case '?':
- printfile("HOTMENU");
- break;
- case 'S':
- prstatus();
- break;
- case 'I':
- ivotes();
- sysoplog("=-Ran IVotes");
- break;
- case 'L':
- sl1(3,s1);
- printfile(s1);
- break;
- case 'T':
- sysoplog("=-Ran TEdit");
- text_edit();
- break;
- case 'Y':
- printfile(status.log1);
- break;
- case 'U':
- sysoplog("=-Ran UEdit");
- uedit(usernum,0);
- break;
- case 'Z':
- zlog();
- break;
- case 'V':
- sysoplog("=-Ran VotePrint");
- voteprint();
- break;
- case 'B':
- sysoplog("=-Ran BoardEdit");
- boardedit();
- break;
- case 'E':
- prt(2,"Filename? ");
- input(s1,50);
- if (s1[0]) {
- if ((okansi()) && (thisuser.defed))
- external_edit(s1,"",thisuser.defed-1,500);
- else
- tedit(s1);
- }
- break;
- case 'D':
- sysoplog("=-Ran DirEdit");
- dlboardedit();
- break;
- case 'G':
- sysoplog("=-Ran GFileEdit");
- gfileedit();
- break;
- case 'C':
- sysoplog("=-Ran ChainEdit");
- chainedit();
- break;
- case 'H':
- chuser();
- break;
- case 'M':
- if(checkpw()) {
- sysoplog("=-Ran MailR");
- mailr();
- }
- break;
- case 'O':
- if(checkpw()) {
- sysoplog("=-Shelled to DOS");
- full_external(getenv("COMSPEC"),1,0);
- topscreen();
- }
- break;
- case 'Q':
- insysmenu=0;
- break;
- }
- }
- restorel(cl,atr,xl,&cc);
- }
- }
-
- /* End of block read */
- Save SYSOPF.C
-
- Step 6:
- Load BBS.C
- Search for
- init(1);
- Directly after that, add this line:
- insysmenu=0;
- Save BBS.C
-
- Step 7:
- Recompile the BBS,
- all done!
- Make sure to add a menu, HOTMENU.MSG in your GFILES directory. Mine looks
- like this:
- 0┌───7───────────────────────────4Sysop7─4Hotkey7─4Menu7───────────────────────────0───┐
- │ ┌ 7Co-Sysop Commands0 ┐ │
- 7│0 2S5>1ystem status0 2Y5>1esterday's log0 7│
- 7│0 2I5>1nitialize Voting Questions0 2U5>1ser editor0 7│
- 7│0 2L5>1og0 1for today0 2Z5>1log (system activity)0 7│
- 7│0 2T5>1ext file editor0 2V5>1oting question result > 2VOTING.TXT2 7│
- 7│0 ├ 7Sysop Commands0 ┤ 8│
- 7│0 2B5>1oard list editor0 2C5>1hain list editor0 7│
- 7│0 2E5>1dit any text file0 2H5>1 Change to a user0 7│
- 7│0 2D5>1irectory list editor0 2M5>1ail read (all mail)0 7│
- 7│0 2G5>1file section edit0 2O5>1 Drop to DOS0 7│
- │ └ ┘ │
- └───4Q2─4Quit─back─to─BBS7────────────────────────────────────4?2─4Print─this─menu0───┘
-
-
-
- Disclaimer:
- If, suddenly, upon typing "BBS", all of your C files are erased, I'm not to
- blame. Really. Nope, not me.
- <grin>
- But seriously (how seriously is still under consideration), if your computer
- should develop a mind of its own and take over your life and blackmail you
- because of this mod, I didn't do it. Really.
-
- ---->--->-->->> Stingray <<-<--<---<----
- Sysop of Special F/X BBS, (510) 689-8620
-
-
-